home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar 2005 March
/
Gamestar_71_2005-03_dvd.iso
/
Dema
/
willofsteel_demo.exe
/
{app}
/
Data
/
Shaders
/
decal00.fx
next >
Wrap
Text File
|
2004-10-23
|
3KB
|
135 lines
float4x4 WorldViewProjection;
float4x4 ShadowViewProjection;
float4x4 TextureMatrix;
float4x4 WorldMatrix;
float4x4 ViewIT;
float4x4 DecalMatrix;
texture DiffuseTexture;
texture ShadowTexture;
texture CloudsTexture;
float4 SunColor = { 1., 0.86, .70, .0 };
float4 Ambient = { 0.24, 0.12, 0.04, 1.0 };
float3 LightDirection = { 0.7, 0.7, 0.0 };
float4 ZBias = { 1.0, 0.0, 0.0, -0.003 };
float3 UpVector = { 0.0, 1.0, 0.0 };
float4 Zero = { .0, .0, .0, .0 };
float4 Selected = { .0, 1., .0, 1. };
float4 CloudUVShift = { 0.0, 0.0, 0.0, 0.0 };
float4 CloudScale = { 0.01, 0.01, 0.01, 0.01 };
technique Technique0
{
pass Pass0
{
Texture[0] = (DiffuseTexture);
ColorOp[0] = SELECTARG1;
ColorArg1[0] = TEXTURE;
AlphaOp[0] = MODULATE;
AlphaArg1[0] = TEXTURE;
AlphaArg2[0] = DIFFUSE;
ColorOp[1] = DISABLE;
AlphaOp[1] = DISABLE;
VertexShaderConstant[0] = <WorldViewProjection>;
VertexShaderConstant[4] = <ShadowViewProjection>;
VertexShaderConstant[8] = <TextureMatrix>;
VertexShaderConstant[12] = <WorldMatrix>;
VertexShaderConstant[16] = <ViewIT>;
VertexShaderConstant[20] = <DecalMatrix>;
VertexShaderConstant[30] = <LightDirection>;
VertexShaderConstant[31] = <ZBias>;
VertexShaderConstant[32] = <SunColor>;
VertexShader =
decl
{
stream 0;
float v0[3];
float v3[3];
float v6[4];
float v10[2];
}
asm
{
vs_1_1
dcl_position v0
dcl_normal v3
dcl_color v6
dcl_texcoord0 v10
m4x4 oPos, v0, c0
m4x4 oT0, v10, c20
dp3 r0, v3, c30
mul r0, r0, c32
mov r0.a, v6.a
mov oD0, r0
};
PixelShaderConstant[17] = <Ambient>;
PixelShader = NULL;
}
}
technique Technique1
{
pass Pass0
{
Texture[0] = (DiffuseTexture);
ColorOp[0] = SELECTARG1;
ColorArg1[0] = TEXTURE;
AlphaOp[0] = MODULATE;
AlphaArg1[0] = TEXTURE;
AlphaArg2[0] = DIFFUSE;
ColorOp[1] = DISABLE;
AlphaOp[1] = DISABLE;
VertexShaderConstant[0] = <WorldViewProjection>;
VertexShaderConstant[12] = <WorldMatrix>;
VertexShaderConstant[16] = <ViewIT>;
VertexShaderConstant[30] = <LightDirection>;
VertexShaderConstant[31] = <ZBias>;
VertexShaderConstant[32] = <SunColor>;
VertexShader =
decl
{
stream 0;
float v0[3];
float v3[3];
float v6[4];
float v10[2];
}
asm
{
vs_1_1
dcl_position v0
dcl_normal v3
dcl_color v6
dcl_texcoord0 v10
m4x4 oPos, v0, c0
mov oT0, v10
mov oD0, v6
};
PixelShaderConstant[0] = <Ambient>;
PixelShader = NULL;
}
}